<template>
  <div class="demo">
    <div class="demo-title">相册模式</div>
    <div class="demo-content">
      <Image
        :preview="{ visible: false }"
        :width="200"
        src="https://gw.alipayobjects.com/zos/antfincdn/LlvErxo8H9/photo-1503185912284-5271ff81b9a8.webp"
        @click="visible = true"
      />
      <div style="display: none">
        <Image.PreviewGroup :preview="{ visible, onVisibleChange: (vis) => (visible = vis) }">
          <Image
            src="https://gw.alipayobjects.com/zos/antfincdn/LlvErxo8H9/photo-1503185912284-5271ff81b9a8.webp"
          />
          <Image
            src="https://gw.alipayobjects.com/zos/antfincdn/cV16ZqzMjW/photo-1473091540282-9b846e7965e3.webp"
          />
          <Image
            src="https://gw.alipayobjects.com/zos/antfincdn/x43I27A55%26/photo-1438109491414-7198515b166b.webp"
          />
        </Image.PreviewGroup>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue';
  import Image from '@sscd/image';
  const visible = ref(false);
</script>
